home *** CD-ROM | disk | FTP | other *** search
/ Amoszine 4 / Amoszine 4 (Disk 2 of 3).adf / Intuition_Procs / intui.lha / Demo_1.Amos / Demo_1.amosSourceCode
AMOS Source Code  |  1992-02-26  |  2KB  |  71 lines

  1. ' Demo of OpenScreen, CloseScreen and WritePixel 
  2. ' note that during the demo the drag bar and back/front gadgets may be used
  3. '
  4. Amos To Back 
  5. '
  6. Wait 50
  7. '
  8. _OPENSCREEN[0,0,320,200,2,0,1,2,15,0,0,0,"          AMOS And Intuition "]
  9. '
  10. For B=12 To 199
  11.    For A=0 To 319
  12.       _WRITEPIXEL[_IS,A,B]
  13.    Next 
  14. Next 
  15. '
  16. _CLOSESCREEN[_IS]
  17. '
  18. Wait 50
  19. '
  20. Amos To Front 
  21. '
  22. Edit 
  23. '
  24. Procedure _OPENSCREEN[X,Y,W,H,D,F,B,V,S,C,G,M,T$]
  25.    
  26.    Global _IS
  27.    
  28.    T$=T$+Chr$(0)
  29.    
  30.    Reserve As Work 10,32
  31.    
  32.    A=Start(10)
  33.    
  34.    Doke A,X : Add A,2 : Rem                             -- x_pos:  
  35.    Doke A,Y : Add A,2 : Rem                             -- y_pos:  
  36.    Doke A,W : Add A,2 : Rem                             -- width:  
  37.    Doke A,H : Add A,2 : Rem                             -- height: 
  38.    Doke A,D : Add A,2 : Rem                             -- depth:  
  39.    Poke A,F : Add A,1 : Rem                             -- detail_pen: 
  40.    Poke A,B : Add A,1 : Rem                             -- block_pen:  
  41.    Doke A,V : Add A,2 : Rem                             -- view_modes: 
  42.    Doke A,S : Add A,2 : Rem                             -- screen_type:  
  43.    Loke A,C : Add A,4 : Rem                             -- font: 
  44.    Loke A,Varptr(T$) : Add A,4 : Rem                    -- title:   
  45.    Loke A,G : Add A,4 : Rem                             -- gadgets:  
  46.    Loke A,M : Rem                                       -- bitmap:     
  47.    
  48.    Areg(0)=Start(10)
  49.    
  50.    _IS=Intcall(-198)
  51.    
  52.    Erase 10
  53.    
  54. End Proc
  55. Procedure _CLOSESCREEN[_IS]
  56.    
  57.    Areg(0)=_IS : Rem     -- Screen Handle In A0 
  58.    
  59.    NULL=Intcall(-66)
  60.    
  61. End Proc
  62. Procedure _WRITEPIXEL[_IS,X,Y]
  63.    
  64.    Areg(1)=_IS+84
  65.    
  66.    Dreg(0)=X : Rem     -- X Pos 
  67.    Dreg(1)=Y : Rem     -- Y Pos 
  68.    
  69.    NULL=Gfxcall(-324)
  70.    
  71. End Proc